<?php
require(ROOT . '/controllers/CommonController.class.php');
class NoteController extends CommonController {

	public function __construct() {
		parent::__construct(__CLASS__);
	}

	public function indexAction($segments) {
		$plan = intval($segments[0]);

		$sql = "select * from `note` where plan={$plan}";

		$db = DB::open('reading');

		$notes = $db->query($sql);

		$this->assign('notes', $notes);

		$this->rend('index');
	}

	public function newAction($segments) {
		$this->rend('new');
	}

}
